/**   
 * @Title: QuestionSet.java 
 * @Package cn.edu.scu.healthserver.domain 
 * @Description: TODO 
 * @author 
 * @date 
 * @version V0.0   
 */
package cn.edu.cdtu.healthclient.domain;

import java.util.List;

/** 
 * @ClassName: QuestionSet 
 * @Description: TODO
 * @author 
 * @date 
 *  
 */
public class QuestionSet {

	private Question question;
	private List<Choose> chooses;
	/** 
	 * @Title: QuestionSet
	 * @Description: TODO
	 * @throws 
	 *
	 */
	public QuestionSet() {
	}
	/** 
	 * @Title: QuestionSet
	 * @Description: TODO
	 * @throws 
	 *
	 * @param question
	 * @param chooses
	 */
	public QuestionSet(Question question, List<Choose> chooses) {
		this.question = question;
		this.chooses = chooses;
	}
	/**
	 * @return the question
	 */
	public Question getQuestion() {
		return question;
	}
	/**
	 * @param question the question to set
	 */
	public void setQuestion(Question question) {
		this.question = question;
	}
	/**
	 * @return the chooses
	 */
	public List<Choose> getChooses() {
		return chooses;
	}
	/**
	 * @param chooses the chooses to set
	 */
	public void setChooses(List<Choose> chooses) {
		this.chooses = chooses;
	}
	/* (non-Javadoc)
	 * <p>Title: hashCode</p> 
	 * <p>Description: </p> 
	 * @return 
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((chooses == null) ? 0 : chooses.hashCode());
		result = prime * result
				+ ((question == null) ? 0 : question.hashCode());
		return result;
	}
	/* (non-Javadoc)
	 * <p>Title: equals</p> 
	 * <p>Description: </p> 
	 * @param obj
	 * @return 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		QuestionSet other = (QuestionSet) obj;
		if (chooses == null) {
			if (other.chooses != null)
				return false;
		} else if (!chooses.equals(other.chooses))
			return false;
		if (question == null) {
			if (other.question != null)
				return false;
		} else if (!question.equals(other.question))
			return false;
		return true;
	}
	/* (non-Javadoc)
	 * <p>Title: toString</p> 
	 * <p>Description: </p> 
	 * @return 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "QuestionSet [question=" + question + ", chooses=" + chooses
				+ "]";
	}
	
}
